import http from '../utils/http.js'

//查询所有标签
function showTagLabel() {
    return http({
        method: 'post',
        url: '/admin/memberTag/selectAllTagsByPage',
        params:{
            page:1,
            limit:100,
        }
    })
}
// 通过内容会员模糊查询标签
function showTagByTagNameMohu(tagName){
    return http({
        method: 'post',
        url: '/admin/memberTag/selectAllTagsByName',
        params:{
            tagName,
            page:1,
            limit:100,
        }
    })
}

// 添加内容会员标签
function addMemberTag(tagName){
    return http({
        method: 'post',
        url: '/admin/memberTag/addTag',
        params:{
            tagName,
            page:1,
            limit:100,
        }
    })
}

// 删除会员内容标签
function deleteMemberTag(id){
    return http({
        method: 'post',
        url: '/admin/memberTag/deleteTagById',
        params: {
            id
        }
    })
}

// 编辑会员内容标签
function editMemberTag(id,tagName){
    return http({
        method: 'post',
        url: '/admin/memberTag/updateMemberTagById',
        params: {
            id,
            tagName,
        }
    })
}

export {
    showTagLabel,
    showTagByTagNameMohu,
    addMemberTag,
    deleteMemberTag,
    editMemberTag
}

